Back to Article
Colour space abbreviations
Download Source

Colour space abbreviations

Author

Alex Koiter

Load Libraries

In [1]:
library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.4     ✔ readr     2.1.5
✔ forcats   1.0.0     ✔ stringr   1.5.1
✔ ggplot2   3.5.1     ✔ tibble    3.2.1
✔ lubridate 1.9.3     ✔ tidyr     1.3.1
✔ purrr     1.0.2     
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(gt)
In [2]:
abbrev <- tribble(
  ~`Colour space model`, ~Parameter, ~Abbreviation,
  "RGB",                  "Red",      "R",
  "RGB",                  "Green",    "G",
  "RGB",                  "Blue",     "B",
  "CIE xyY",              "Chromatic coordinate x",     "x",
  "CIE xyY",              "Chromatic coordinate y",     "y",
  "CIE XYZ",              "Brightness",     "Y",
  "CIE XYZ",              "Virtual component X",     "X",
  "CIE xyY",              "Virtual component Z",     "Z",
  "CIE LAB",              "Metric lightness function",     "L",
  "CIE LAB",              "Chromatic coordinate opponent red–green scales",     "a*",
  "CIE LAB",              "Chromatic coordinate opponent blue–yellow scales",     "b*",
  "CIE LUV",              "Chromatic coordinate opponent red–green scales",     "u*",
  "CIE LUV",              "Chromatic coordinate opponent blue–yellow scales",     "v*",
  "CIE LCH",              "CIE hue",     "c*",
  "CIE LCH",              "CIE chroma",     "h*",)
In [3]:
suptab1 <- abbrev |>
  group_by(`Colour space model`) |>
  gt() |>
  tab_style(style =  cell_text(weight = "bold", align = "center"), locations =  cells_row_groups()) |>
  tab_style(style =  cell_text(align = "left"), locations =  cells_body()) |>
  tab_style(style =  cell_text(weight = "bold", align = "left"), locations =  cells_column_labels())
suptab1
Parameter Abbreviation
RGB
Red R
Green G
Blue B
CIE xyY
Chromatic coordinate x x
Chromatic coordinate y y
Virtual component Z Z
CIE XYZ
Brightness Y
Virtual component X X
CIE LAB
Metric lightness function L
Chromatic coordinate opponent red–green scales a*
Chromatic coordinate opponent blue–yellow scales b*
CIE LUV
Chromatic coordinate opponent red–green scales u*
Chromatic coordinate opponent blue–yellow scales v*
CIE LCH
CIE hue c*
CIE chroma h*
saveRDS(suptab1, file = here::here("./images/suptab1.rds"))